package pseudoAssemblerCompiler.twopassassembler.view.common;

import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.CTabFolder;
import org.eclipse.swt.layout.FormAttachment;
import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.widgets.Composite;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Created with IntelliJ IDEA.
 * User: Администратор
 * Date: 19.05.12
 * Time: 13:07
 * To change this template use File | Settings | File Templates.
 */
public class CTabContainer {

    private static final Logger LOGGER =
            LoggerFactory.getLogger(CTabContainer.class);

    /**
     * Панель для таблицы кодов операции
     */
    private CTabFolder _cTabFolder;

    public CTabContainer (Composite aParent) {
        _cTabFolder = new CTabFolder(aParent, SWT.BORDER);
        _cTabFolder.setSimple(false);
        _cTabFolder.setUnselectedImageVisible(false);
        _cTabFolder.setUnselectedCloseVisible(false);
        mainLayout();
    }

    public void setController(Object aAdminController) {
        //
    }

    private void mainLayout () {
        FormData formData;
        //Атрибуты
        formData = new FormData();
        formData.left = new FormAttachment(0, 0);
        formData.top = new FormAttachment(0, 0);
        formData.right = new FormAttachment(100, 0);
        formData.bottom = new FormAttachment(100, 0);
        _cTabFolder.setLayoutData(formData);
    }

    public void create () {
        mainLayout();
    }

    public CTabFolder getCTabFolder () {
        return _cTabFolder;
    }

}
